from utils.api import API
from django.conf.urls import url
from order.forms import *
from order.views import views_order, view_admin

baseUrl = "/api/order/"

orderListAPI = API(OrderListForm, method='POST', moduleUrl='list/', urlPrefix=baseUrl)
orderDetailAPI = API(OrderDetailForm, method='POST', moduleUrl='detail/', urlPrefix=baseUrl)
orderDealAPI = API(OrderDealForm, method='POST', moduleUrl='deal/', urlPrefix=baseUrl)
orderSearchAPI = API(OrderSearchForm, method='POST', moduleUrl='screen/', urlPrefix=baseUrl)
groupOrderListAPI = API(GroupOrderListForm, method='POST', moduleUrl='groupList/', urlPrefix=baseUrl)

urlpatterns = [
    url(orderListAPI.moduleUrl, views_order.orderList),
    url(orderDetailAPI.moduleUrl, views_order.orderDetail),
    url(orderDealAPI.moduleUrl, views_order.orderDeal),
    url(orderSearchAPI.moduleUrl, view_admin.orderSearch),
    url(groupOrderListAPI.moduleUrl, views_order.groupOrderList),
]